package com.hxzy.system.service.impl;

import com.hxzy.common.constant.Constants;
import com.hxzy.common.core.domain.entity.User;
import com.hxzy.common.core.domain.model.LoginUser;
import com.hxzy.common.exception.ServiceException;
import com.hxzy.common.exception.user.CaptchaExpireException;
import com.hxzy.common.exception.user.UserPasswordNotMatchException;
import com.hxzy.common.security.TokenService;
import com.hxzy.common.utils.DateUtils;
import com.hxzy.common.utils.MessageUtils;
import com.hxzy.common.utils.ServletUtils;
import com.hxzy.common.utils.StringUtils;
import com.hxzy.common.utils.ip.IpUtils;
import com.hxzy.common.utils.text.Convert;
import com.hxzy.system.dto.LoginUserDTO;
import com.hxzy.system.mapper.UserMapper;
import com.hxzy.system.service.SysConfigService;
import com.hxzy.system.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


/**
 * 类说明
 *
 * @author admin
 * @date 2021-09-25
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class UserServiceImpl extends CommonServiceImpl<User,Long> implements UserService {

    private UserMapper userMapper;

    @Autowired
    private SysConfigService sysConfigService;





    @Autowired
    public void setUserMapper(UserMapper userMapper) {
        this.userMapper = userMapper;
        super.setMyBatisBaseDao(userMapper);
    }

    @Override
    public User selectByName(String account) {
        return this.userMapper.selectByName(account);
    }


}
